package cn.kimming.wms.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.kimming.wms.dao.IDepotDAO;
import cn.kimming.wms.domain.Depot;
import cn.kimming.wms.query.QueryObject;
import cn.kimming.wms.service.IDepotService;

@Service("depotService")
public class DepotServiceImpl implements IDepotService {

	@Autowired
	private IDepotDAO depotDAO;
	
	@Override
	public void save(Depot obj) {
		depotDAO.save(obj);
	}

	@Override
	public void update(Depot obj) {
		depotDAO.update(obj);
	}

	@Override
	public void delete(Long id) {
		depotDAO.delete(depotDAO.get(id));
		
	}

	@Override
	public Depot get(Long id) {
		return depotDAO.get(id);
	}

	@Override
	public List<Depot> list() {
		return depotDAO.list();
	}

	@Override
	public List<Depot> query(QueryObject qo) {
		return depotDAO.query(qo);
	}
}
